<%-- Copyright (c) 2010 Canadensys --%>
<%-- JSP to handle Ajax call to search a name (taxon, vernacular) --%>
<%@ page import="net.canadensys.dataportal.vascan.utils.Fulltext" %>
<%@ page import="java.util.Vector" %>
<%@ page import="java.util.HashMap" %>
<%@ page import="org.json.*" %>

<%
    JSONObject results = new JSONObject();
    String k = null;
    boolean searchFullScientificName = true;
    boolean searchVernacularName = true;
    boolean returnFullResults = true;
    if(request.getParameter("k") != null){
        k = request.getParameter("k");
        results = (JSONObject) Fulltext.searchNameBag(k);
    }
    out.clear();
    response.setCharacterEncoding("UTF-8");
    out.write(results.toString());
%>